#include <iostream>
using namespace std;


/**
 * Finds the number of lattice paths in a w * w square
 * Can work up to 21 * 21 due to limited variable length
 */
long long int latticePaths(int w){
    long long int f = 1;
    long long int a = 1;
    for(int i = 2*w; i>w; i--){
        if(i%2==0){
            f*=2;
        }else{
            f*=i;
        }
    }
    for(int i = w/2; i>1; i--){
        a*=i;
    }
    return f/a;
}


int main(){
    for(long long int w = 2; w<21; w++){
        cout << "Lattice paths in a " << w << "x" << w << ": " << latticePaths(w) << endl;
    }
    return 0;
}
